 //******************************************************
 // ReadingMaterial.java           Author:20172323wyh
 //
 // 设计一个父类代表各种类型的阅读材料，定义各种属性。
 //******************************************************
 
 public class ReadingMaterial
 {
    protected int pages;
    protected String Keyword, name;
    
    public ReadingMaterial(String names, String words, int numPages)
    {
       name = names;
       Keyword = words;
       pages = numPages;
    }

    public void setPages(int numPages)
    {
       pages = numPages;
    }

    public int getPages()
    {
       return pages;
    }
 
    public String toString()
    {
       return name +"\n"+ Keyword +"\n"+ pages;
    }
 }
